{%load i18n%}
{% spaceless %}
{%ifnotequal pages 1%}
{% if pages %}
<div class="paginator">
{% if has_previous %}<span class="prev"><a href="./?page={{ previous }}{%if args%}{{args}}{%endif%}">&laquo; {%trans "Previous"%}</a></span>{% else %}<span class="prev-na">&laquo; {%trans "Previous"%}</span>{% endif %}

{% if not in_leading_range %}
...
{% for num in pages_outside_trailing_range %}
<span class="page"><a title="{{title}}" href="./?page={{ num }}{%if args%}{{args}}{%endif%}" >{{ num }}</a></span>
{% endfor %}
{% endif %}
 
{% for num in page_numbers %}
  {% ifequal num page %}
    <span class="curr">{{ num }}</span>
  {% else %}
     <span class="page"><a href="./?page={{ num }}{%if args%}{{args}}{%endif%}" title="{{title}}">{{ num }}</a></span>
  {% endifequal %}
{% endfor %}
 
{% if not in_trailing_range %}
 {% for num in pages_outside_leading_range %}
  <span class="page"><a title="{{title}}" href="./?page={{ num }}{%if args%}{{args}}{%endif%}" >{{ num }}</a></span>
 {% endfor %}
 ...
{% endif %}
 

{% if has_next %}<span class="next"><a href="./?page={{ next }}{%if args%}{{args}}{%endif%}" title="{{title}}. {%trans "Next Page"%}">{%trans "Next"%} &raquo;</a></span>{% else %}<span class="next-na">{%trans "Next"%} &raquo;</span>{% endif %}
</div> 
{% endif %}
{%endifnotequal%}
{% endspaceless %}